
module.exports = function (mongoose) {

    var CustomerSchema = new mongoose.Schema({
        _id:          { type: String, unique: true },
        profile:      { type: String, unique: true },
        terms:        { type: String },
        taxrate:      { type: String },
        bilcompany:   { type: String },
        bilattention: { type: String },
        biladdr1:     { type: String },
        biladdr2:     { type: String },
        bilcity:      { type: String },
        bilstate:     { type: String },
        bilzip:       { type: String },
        bilcontact:   { type: String },
        bilphone:     { type: String },
        bilemail:     { type: String },

        shpcompany:   { type: String },
        shpattention: { type: String },
        shpaddr1:     { type: String },
        shpaddr2:     { type: String },
        shpcity:      { type: String },
        shpstate:     { type: String },
        shpzip:       { type: String },
        shpcontact:   { type: String },
        shpphone:     { type: String },
        shpemail:     { type: String }
    });

    var Customer = mongoose.model('Customer', CustomerSchema);

    //put custom methods here

    return {
        Customer: Customer
    };
};
